import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import '../../config/public_color.dart';
import '../container/radius_container.dart';
import 'public_text_field.dart';

/// FileName radius_text_field
///
/// @Author lax
/// @Date 2024/6/6
///
/// @Description

class RadiusTextField extends RadiusContainer {
  RadiusTextField({
    super.key,
    super.radius,
    Color? color,
    String? text,
    String? hintText,
    bool enable = true,
    ValueChanged<String>? onChanged,
    TextStyle? style,
    TextStyle? unableStyle,
    TextStyle? hintStyle,
    TextStyle? counterStyle,
    EdgeInsets? padding =
        const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
    TextAlign? textAlign,
    TextInputType? keyboardType,
    List<TextInputFormatter>? inputFormatters,
    InputDecoration? decoration,
    int? maxLines = 1,
    int? minLines,
    int? maxLength,
  }) : super(
          color: color ?? PublicColor.background,
          child: PublicTextField(
            text: text,
            hintText: hintText,
            enable: enable,
            onChanged: onChanged,
            style: style,
            unableStyle: unableStyle,
            hintStyle: hintStyle,
            counterStyle: counterStyle,
            padding: padding,
            textAlign: textAlign,
            keyboardType: keyboardType,
            inputFormatters: inputFormatters,
            decoration: decoration,
            minLines: minLines,
            maxLines: maxLines,
            maxLength: maxLength,
          ),
        );
}
